home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 2003 September / PC Answers September 2003.iso / Software / trial / MonitorIT 5.2.06 / monitorit_fullsetup.exe / data1.cab / Rpm / ViewSyslogDisplay.asp < prev    next >
Encoding:
Text File  |  2003-06-24  |  62.0 KB  |  1,615 lines

  1. <html>
  2. <head>
  3. <title>SYSLOGWatch Display</title>
  4.  
  5. <link rel="stylesheet" type="text/css" href="css/rpmstyle.css">
  6. <style>
  7.  
  8. .EventFilter { border-style : solid; border-width : thin; overflow : clip; background-color:white }
  9. .EventFilter { border-top-color : graytext; border-left-color : graytext; border-bottom-color : white; border-right-color : white}
  10.  
  11. .EventLog { border-style : solid; border-width : thin; overflow : scroll;  background-color:white }
  12. .EventLog { border-top-color : graytext; border-left-color : graytext; border-bottom-color : white; border-right-color : white}
  13.  
  14. .EventConfig {  overflow : none; background-color:activeborder }
  15. .EventConfig { border-top-color : graytext; border-left-color : graytext; border-bottom-color : white; border-right-color : white}
  16.  
  17. .VASelectBox { height : 270px; width : 375px; background-color: white; color: infotext; }
  18. .VASelectBox { border-style : solid; border-width : 2px; }
  19. .VASelectBox { border-top-color : #555555; border-left-color : #555555; border-bottom-color : #E0E0E0; border-right-color : #E0E0E0}
  20.  
  21. .VAMainBox { border: none; background-color : activeborder; }
  22.  
  23. .PopUpBox { background-color:activeborder; position:absolute; margin:0; padding:0; border : solid thin; }
  24. .PopUpBox { border-top-color : #E0E0E0; border-left-color : #E0E0E0; border-bottom-color : #555555; border-right-color : #555555 }
  25.  
  26. </style>
  27. </head>
  28.  
  29. <body class="bodyc" style="margin:2px;" language="JavaScript" RPMHostIP="!BreakoutBot:MonitorIP!" RPMHostPort="!BreakoutBot:MonitorPort!" RPMUserName="!BreakoutBot:UserName!" BOBDone="!BreakoutBot:Done!" onload="top.banner.savePageCoord(event,document.body,'ViewSyslogDisplay'); InitRpmCC_VA();" onbeforeunload="DiscoRpmCC_VA()" onresize="processSizeChange()" onclick="checkClick()" onkeydown="processBSP()">
  30.  
  31. <script LANGUAGE="JavaScript">
  32. <!--
  33. //border-style : solid; border-width : thin;
  34. var    VAMode = ""; // Mode of Operation, New, Edit, Delete, Lookup, ObjectLookup
  35. var    ALupMode = ""; // Lookup Mode of Operation, Computer, Counter
  36. var   AlertLupRecCount = 0; // Count of records returned from Alert Lookup operation
  37. var   AlertSelectIdx = 0; // Index of currently selected Alert 
  38. var    VA_CommBusy = 0; // Comm busy flag
  39. var    CurAlertID = ""; // Current Alert Name selected in Configure
  40. var    CurAlertName = ""; // Current Alert Group Name selected in Configure
  41. var    CurAlertDesc = ""; // Current Alert Group Description
  42. var   FilterRecCnt = 0; // Count of records in the filter
  43. var    FilterSelectIdx = 0; // Filter Select Index 
  44. var    AudioOutBusy = false; // Flag for AudioOut
  45. var   VA_Tid = null; // AudioOut free timeout
  46. var   Tid = null, CTid= null, ATid= null;
  47. var   ELogWinInit = ""; // save for ElogWin init HTML
  48. var   ELBgFlg = 0; // Alert Event Log Background color toggle
  49. var     bdH = 0;
  50. var     byM = null;
  51. var     borderSz = 2; // Thin Bord is 2pixels
  52. var     ValidateFilter = true; // Validate Alert Filter on entry
  53. var     Hp = null; // Host port
  54. var    ReconnectEvent = false;
  55.  
  56. var AC_CompStoreArr = new Array();
  57. var MostRecentHours = 3;
  58. var IsDBChange = false;
  59.  
  60. var   AlertSelectIdx = 0; // Index of currently selected Alert 
  61. var     AlertStoreArr = new Array();
  62. var   AlertLupRecCount = 0; // Count of records returned from Alert Lookup operation
  63.  
  64. // Capture and ignore script errors
  65.     window.onerror = wwScrErr;
  66. function wwScrErr() {
  67.     return true;
  68. }
  69.  
  70. /* On Load tell the Comm control to Connect to the Server */
  71. function InitRpmCC_VA() {
  72.     top.MainLoaded = true; // Flag that Main is now loaded
  73.     top.banner.savePageCoord(event,document.body,"ViewSyslogDisplay");
  74.  
  75.     byM = 2*parseFloat(document.body.style.margin);
  76.     processSizeChange();
  77.  
  78.     /* get Audio Alert checkbox state */
  79.     cc = top.banner.RpmCC_Ban.RegGetKey(top.banner.ServerID+"SyslogDisplayAudioAlertState"); // get state
  80.     if ( cc == "unchecked" ) { // If not checked 
  81.         AlertAudioEnabled.checked = "";
  82.     }
  83.     else { 
  84.         AlertAudioEnabled.checked == "CHECKED";
  85.     }
  86.     cc = top.banner.RpmCC_Ban.RegGetKey(top.banner.ServerID+"SyslogDisplayMostRecentHours"); // get hours
  87.     if ( cc != "" ) {
  88.        MostRecentHours = parseInt(cc,10);
  89.     }
  90.  
  91.       /* Connect to Server and initiate Alert Group Lookup */
  92.     Hp = parseInt(document.body.RPMHostPort,10);
  93.     RpmCC_VA.Connect(document.body.RPMHostIP,Hp, "");
  94. }
  95. function processReconnect() {
  96.     Tid = null;
  97.     if ( RpmCC_VA.IsConnected() ) {
  98.         Tid = setTimeout("processConnectionCheck()",30000); // Delay 30 secs then check connection
  99.         return;
  100.     }
  101.     RpmCC_VA.Connect(document.body.RPMHostIP,Hp, "");
  102. }
  103. function processConnectConfirmed() {
  104.     if ( ReconnectEvent == false ) {
  105.         top.banner.processStartComm(); 
  106.         processVALookupReset(); // go do Alert Lookup
  107.         processLogAndFilterWindows(); // initialize Log and Filter Windows
  108.         ReconnectEvent = true;
  109.     }
  110.     top.Rstatus.Pstat("Connected");
  111.     if ( Tid != null ) {
  112.         clearTimeout(Tid); // stop timeout routine
  113.     }
  114.     Tid = setTimeout("processConnectionCheck()",30000); // Delay 30 secs then check connection
  115. }
  116. function processConnectionCheck() {
  117.     Tid = null;
  118.     RpmCC_VA.SendKeepAlive("Check");
  119.     Tid = setTimeout("processConnectionCheck()",30000); // Delay 30 secs then check connection
  120. }
  121.  
  122. function processMostRecentHours() {
  123.     MostRecentHours = lasthours.selectedIndex;
  124.     top.banner.RpmCC_Ban.RegSetKey(top.banner.ServerID+"SyslogDisplayMostRecentHours",""+MostRecentHours); // set hours
  125.     processClearButton();
  126.     processMostRecentHoursLookup();
  127. }
  128. function processMostRecentHoursLookup() {
  129.     WarningBox.style.display = "";
  130.    if ( MostRecentHours > 0 ) {
  131.        // Get Last 'N' Records
  132.         if ( RpmCC_VA.SyslogCheckLogLookup("GetLast"+MostRecentHours) ) {
  133.             top.Rstatus.Pstat("Unable to start the SYSLOG Data Record LOOKUP request",true);
  134.         }
  135.     }
  136.     else {
  137.         WarningBox.style.display = "none";
  138.         WarningBox1.style.display = "";
  139.     }
  140. }
  141.  
  142. // Process Database Change event
  143. function processDBChanged() {
  144.     CTid = null;
  145.     top.banner.processStartComm(); 
  146.     IsDBChange = true;
  147.     
  148.     // Insure Configure pop-up is hidden and disabled
  149.    //ConfigButton.className = "BoxButtonD"; // disable button
  150.    ConfigButton.disabled = "disabled"; // disable button
  151.     PopUpDiv.style.display="none";
  152.     goSaveLogEntries();
  153.     
  154.     // Clear Stores
  155.     AlertStoreArr.length=0;
  156.     AC_CompStoreArr.length = 0;
  157.     ValidateFilter = true;
  158.     AlertSelectIdx = 0; // Reset Index of currently selected Alert 
  159.     processVALookupReset(); // go do Alert Lookup
  160.     top.Rstatus.StatDB.style.display = "none";
  161.     AL_AlertSel.style.display = "none";
  162. }
  163.  
  164. /* On Unload tell the Comm control to Disconnect from the Server */
  165. function DiscoRpmCC_VA() {
  166.     top.BannerMenuShow();
  167.     RpmCC_VA.Disconnect();
  168.     if (VA_CommBusy == 1) { // stop logo animation if Comm busy flag set
  169.         top.banner.processStopComm();
  170.     }
  171.     // Save Audio Alert checkbox state
  172.     cc = ( AlertAudioEnabled.checked == false ) ? "unchecked" : "checked";
  173.     top.banner.RpmCC_Ban.RegSetKey(top.banner.ServerID+"SyslogDisplayAudioAlertState",cc); // set state
  174.     processClearButton();
  175.     WarningBox.style.display = "";
  176.     goSaveLogEntries();
  177.         
  178.     /* Clear AudioOut Timer if set */
  179.     if ( VA_Tid != null ) {
  180.         clearTimeout(VA_Tid);
  181.     }
  182.     if ( Tid != null ) {
  183.         clearTimeout(Tid);
  184.     }
  185.     if ( CTid != null ) {
  186.         clearTimeout(CTid);
  187.     }
  188.     if ( ATid != null ) {
  189.         clearTimeout(ATid);
  190.     }
  191. }
  192. function goSaveLogEntries() {
  193.     /* Redefine Log Time based on Current Time */
  194.     var dob = new Date(); // get current d/t
  195.     var lt = (dob.getMonth()+1) + "/" + dob.getDate() + "/" + dob.getFullYear();
  196.     lt += " " + dob.getHours() + ":" + dob.getMinutes() + ":" + dob.getSeconds();
  197.     ELogParams.logtime = lt; // update the D/T stamp    
  198.     ELogParams.ELBgFlg = ELBgFlg; // save background flag
  199.     
  200.     /* Save the Log Display, and Filter Display & Store on the Banner Page before exiting */
  201.     top.banner.saveLogDisplay(ELogWin.innerHTML);
  202.     top.banner.saveLogFilter(ELogViewCur.innerHTML);
  203.     AL_AlertSel.innerText = ""; // clear
  204. }
  205.  
  206. // Process Display View Size Change
  207. var SCbsy = false;
  208. var PuPW = "500px", PuPWu=500, PuPH = "280px", PuPHu=280, PuPCH = "235px";
  209. var VFilW = "630px"
  210. function processSizeChange() {
  211.     if ( SCbsy ) 
  212.         return;
  213.     SCbsy = true;
  214.     // Display Height and Width
  215.     bCh = document.body.clientHeight;
  216.     bCw = document.body.clientWidth;
  217.  
  218.     // Determine minimums
  219.     bCh = (bCh < bdH+byM+270) ? bdH+byM+270 : bCh;
  220.     bCw = (bCw < PuPWu) ? PuPWu : bCw;
  221.    document.body.scroll = (bCw <= PuPWu || bCh <= bdH+byM+270) ? "yes" : "no";
  222.    
  223.    // Set Height/Widths for Chart and Button areas
  224.     VA_MainBox.style.height = bCh-(bdH+byM-borderSz)-10;
  225.     VA_MainBox.style.width = bCw-byM-4;
  226.     VA_MainBox.style.display = "";
  227.  
  228.     ELogWinFullH = "" + (bCh-TitleDivSize);    
  229.     var ELWinc = (bCh-TitleDivSize-175);
  230.     ELWinc = (ELWinc < 0) ? 0 : ELWinc;
  231.     ELogWinSplitH = "" + ELWinc;    
  232.     ELogWin.style.height = ( ELogViewCurLine.style.display == "none" ) ? ELogWinFullH : ELogWinSplitH;
  233.     
  234.     ELogViewCur.style.width = (bCw-byM-34 > 530) ? "530px" : bCw-byM-34;
  235.  
  236.     //PopUpContext Menu
  237.    PopUpContextSize(bCw);
  238.     
  239.    // PopUp 
  240.    PuPLeft = (bCw-PuPWu)/2;
  241.    PuPTop = (bCh-PuPHu)/2;
  242.    PopUpDiv.style.left = PuPLeft+"px"; 
  243.    PopUpDiv.style.top = "25px";
  244.    PopUpDiv.style.height = (bCh-110);
  245.    PopUpDiv.style.width = PuPW;
  246.    VA_Select.style.height = (bCh-130);
  247.     SCbsy = false;
  248. }
  249.  
  250. /* Initial Alert Lookup Request */
  251. function processVALookupReset() {
  252.     AlertLupRecCount = 0; // clear Lookup record counter
  253.     if ( RpmCC_VA.AlertGroupLookup("*") ) {
  254.         top.Rstatus.Pstat("Unable to start the Alert LOOKUP request",true);
  255.         processResetButton();
  256.     }
  257.     else {
  258.         VA_CommBusy = 1; // set Comm busy flag
  259.         top.Rstatus.Pstat("One moment while Alert LOOKUP request completes");
  260.     }
  261. }
  262.  
  263. /* Alert Lookup Op Complete */
  264. function processAlertOpComplete() {
  265.     AL_AlertSel.style.display = "none"; // insure hidden
  266.     if (AlertLupRecCount == 0) { // check if any records found
  267.          top.Rstatus.Pstat("No record matches found for Alert LOOKUP request",true);    
  268.         WarningBox.style.display = "none";
  269.         WarningBox1.style.display = "";
  270.      }
  271.      else {
  272.         for (var i=0; i < AlertStoreArr.length; i+=AlertRecLength) {
  273.             if ( AlertStoreArr[i+8] == "01/01/1999 11:15:00" 
  274.                    || AlertStoreArr[i+8] == "1/1/1999 11:15:0" ) {
  275.                    // Keep Syslog Alert
  276.             }
  277.             else { // Otherwise delete all other Alert types
  278.                 AL_AlertSel.remove(i/AlertRecLength);
  279.                 var idx = i;
  280.                 for (var j = idx+AlertRecLength; j < AlertStoreArr.length; ++idx, ++j) {
  281.                     AlertStoreArr[idx] = AlertStoreArr[j];
  282.                 }
  283.                 i -= AlertRecLength;
  284.                 AlertStoreArr.length -= AlertRecLength;                
  285.             }
  286.         }
  287.  
  288.         AL_AlertSel.style.display = ""; // compnesate for IE 5.5 bug; see "hideAlertSel()" below
  289.         ALupMode = "";
  290.           //ConfigButton.className = "BoxButton"; // enable button
  291.           ConfigButton.disabled = ""; // enable button   
  292.           //ViewCurrentButton.className = "BoxButton"; // enable button
  293.           ViewCurrentButton.disabled = ""; // enable button   
  294.         top.Rstatus.Pstat("Request Completed");
  295.         processValidateFilter(); // go validate the Alert Filter
  296.         if ( IsDBChange == false ) {
  297.             processMostRecentHoursLookup();
  298.         }
  299.           IsDBChange = false;
  300.         processAccumulatedAlerts(); // go process the accumulated Alerts
  301.         top.banner.processStopCommX(); 
  302.         Tid = setTimeout("hideAlertSel()",50); // Delay 50 ms. then try to hide AlertSel
  303.     }     
  304.      processResetButton();    
  305. }
  306.  
  307. // Print Log
  308. var DiscStatWindow = null;
  309. function processPrintStatus() {
  310.     if ( !top.banner.IE55orBetter ) {
  311.         alert("Print requires IE 5.5/SP1 or greater. Download current, free IE update from Microsoft's web site");
  312.         return;
  313.     }
  314.     FakeBut.click();    // simulate event to call "savePageCoord(...)"
  315.     var wprop = "height="+top.banner.bCh+",width="+top.banner.bCw
  316.     wprop += ",top="+(top.banner.bY-28)+",left="+(top.banner.bX-4)+",scrollbars";
  317.     var rName = ""+Math.random(); // use Random number to get unique Window name
  318.     rName = rName.substring(2,rName.length);
  319.     DiscStatWindow = window.open("",rName,wprop);
  320.     if ( DiscStatWindow == null ) {
  321.         return;   
  322.     }
  323.     var dh = "<html><head><title>MonitorIT - SYSLOGWatch Display Report</title>";
  324.     dh += "<link rel='stylesheet' type='text/css' href='css/rpmstyle.css'></head><body";
  325.     dh += " title='Exit to Close Window when Printing is complete'>"; 
  326.     dh += ELogWin.innerHTML;
  327.     dh += '<script LANGUAGE="JavaScript">ploghdr.border="1"; ploghdr1.width="152"; ploghdr2.width="93"; ploghdr3.width="103"; ploghdr4.width="123"; window.focus();';
  328.     dh += ' </script></body></html>';
  329.     DiscStatWindow.document.open();
  330.     DiscStatWindow.document.write(dh)
  331.     DiscStatWindow.document.close();
  332.     DiscStatWindow.print();
  333. }
  334.  
  335. /* Initialize the Log and Filter Windows */
  336. function processLogAndFilterWindows() {
  337.     var    hs = "";
  338.     outputLogWindowHeader();
  339.      ELogWinInit = ELogWin.innerHTML; // save for clear log
  340.     outputFilterWindowHeader();
  341.     /* Restore the Log Display if Previously Saved */
  342.     hs = top.banner.restoreLogDisplay();
  343.     if ( hs != "" ) { 
  344.         ELogWin.innerHTML = hs;
  345.         ELBgFlg = ELogParams.ELBgFlg; // restore
  346.     } 
  347.     /* Restore the Filter Display and Storage if Previously Saved */
  348.     hs = RpmCC_VA.RegGetKey(top.banner.ServerID+"SyslogDisplayLogFilterSave");
  349.     if ( hs != "" ) {
  350.         ELogViewCur.innerHTML = hs;
  351.         FilterRecCnt = VA_FilterStore.length / FilterRecSize;
  352.     } 
  353. }
  354. function outputLogWindowHeader() {
  355.     /* Format Output to Log Window */
  356.     FOps = "<table id='ploghdr' border='0' cellpadding='0' cellSpacing='1' width='100%'>";
  357.     FOps += "<tr><td id='ploghdr1' width='155' colspan='1' align='center' style='background-color:activeborder' class='optextb'>";
  358.     FOps += "Server/Device Name" + "</td>";
  359.     FOps += "<td id='ploghdr2' width='95' colspan='1' align='center' style='background-color:activeborder' class='optextb'>";
  360.     FOps += "Tag" + "</td>";
  361.     FOps += "<td id='ploghdr3' width='104' colspan='1' align='center' style='background-color:activeborder' class='optextb'>";
  362.     FOps += "Date/Time Stamp" + "</td>";
  363.     FOps += "<td id='ploghdr4' width='124' colspan='1' align='center' style='background-color:activeborder' class='optextb'>";
  364.     FOps += "Facility/Severity" + "</td>";
  365.     FOps += "<td width='*' colspan='1' align='center' style='background-color:activeborder' class='optextb'>";
  366.     FOps += "Message" + "</td>";
  367.     FOps += "</tr></table>";
  368.     ELogWin.insertAdjacentHTML("afterBegin",FOps);
  369.      WarningBox.style.display = "";    
  370. }
  371.  
  372. function outputFilterWindowHeader() {
  373.     /* Format Output to Filter Window */
  374.     FOps = "<table border='0' cellpadding='0' cellSpacing='1' width='500'>";
  375.     FOps += "<tr><td width='50%' colspan='1' align='center' style='background-color:activeborder' class='optextb'>";
  376.     FOps += "Watch/Alert Name" + "</td>";
  377.     FOps += "<td width='50%' colspan='1' align='center' style='background-color:activeborder' class='optextb'>";
  378.     FOps += "Watch/Alert Type" + "</td>";
  379.     FOps += "</tr></table>";
  380.     ELogViewCur.insertAdjacentHTML("beforeEnd",FOps);
  381. }
  382.  
  383. // Process the Unsolicited Alerts that were Accumulated
  384. function processAccumulatedAlerts() {
  385.     var    PrevAgid = "", hs = null;
  386.     /* Get and process the Unsolicited Alerts accumulated */
  387.       var Tflg = ELogParams.logtime; // Time stamp of last Log entry
  388.       if ( Tflg == "0" ) { // get Start Time for Client
  389.        Tflg = top.banner.getLogStartTime();
  390.        ELogParams.logtime = Tflg;
  391.    }
  392.  
  393.     // Get SyslogWatch  Alerts
  394.     PrevAgid = ""; // reinitialize
  395.     var Uaa = top.banner.getUnsolicitedSyslogCheckAlertArray(); 
  396.     top.banner.enableUnsolicitedSyslogCheckAlerts();
  397.     var UaaArray = new Array();
  398.     UaaArray = Uaa.split(","); // Parse out the AlertGroupIDs~LogFileID
  399.     for ( var i=0; i<UaaArray.length; i++ ) {
  400.        hs = UaaArray[i]; // get an AlertGrp ID~LogFileID
  401.        if ( hs != PrevAgid ) { // if same as previous, skip it
  402.            processUnsolicitedSyslogCheckAlertEvent(hs,Tflg);
  403.            PrevAgid = hs; // set as Previous   
  404.         }
  405.     }
  406.     if ( ELogParams.logeventid != "" ) {
  407.        //ClearButton.className = "BoxButton"; // enable button
  408.        ClearButton.disabled = ""; // enable button   
  409.     }
  410. }
  411.  
  412. /* Play specified WAV file as an AudioAlert */
  413. function processAlertAudioOut() {
  414.     if ( AlertAudioEnabled.checked == false || AudioOutBusy == true )
  415.         return; // exit if not enabled or Busy
  416.     RpmCC_VA.DoMessageBeep(0x40); // System Asterisk
  417. }
  418. function freeAudioOut() {
  419.     AudioOutBusy = false;
  420. }
  421.  
  422. /* Process the Unsolicited Syslog Check Alert Event */
  423. function processUnsolicitedSyslogCheckAlertEvent(AGID_FCLID,Tflg) {
  424.     var warr = new Array();
  425.     warr = AGID_FCLID.split("~"); // split out Alert Grp ID and Syslog Check Log Record ID
  426.     if ( CheckAlertFilter(warr[0],Tflg) == false ) 
  427.         return; // if not in filter
  428.     /* Initiate Read of File Check Log Data */
  429.     if ( RpmCC_VA.SyslogCheckLogLookup(warr[1]) ) {
  430.         top.Rstatus.Pstat("Unable to start the Syslog Check Log Data Record LOOKUP request",true);
  431.     }
  432. }
  433. // SYSLOG Check Alert Log Record
  434. var ServEventRecLth = 2;
  435. function processAlertSyslogCheckRecord(LogRecStrg) {
  436.       var WLRec = new Array();
  437.       WLRec = LogRecStrg.split("~"); // parse the Log Record
  438.       // Alert Group ID, Computer ID, Time Stamp
  439.     if ( IsDisplayInLog(WLRec[3],WLRec[2],WLRec[8]) == false )
  440.         return; // Didn't pass filter test
  441.  
  442.     // Check for duplicate by comparing versus Event ID array 
  443.     var EidArr = new Array();     
  444.     EidArr = ELogParams.logeventid.split(",");
  445.     Eid = WLRec[0]+"~"+WLRec[3]; // Event ID = SyslogCheckLogID~AlertGroupID
  446.     for ( var i=0; i<EidArr.length; i++ ) {
  447.         if ( Eid == EidArr[i] ) // if match then duplicate
  448.               return;
  449.     }
  450.     var CompID = WLRec[2]; // Computer ID
  451.     // Save Syslog Check Log Record string in temporary store
  452.     addElementToSelect(VA_ServEventStore,CompID); //+0
  453.     addElementToSelect(VA_ServEventStore,"SyslogCheckLog~"+LogRecStrg);
  454.     // Lookup Computer Name and Description 
  455.     if ( ALupMode != "AlertEvent" ) { 
  456.     // if read not already in progress, 
  457.         goCheckServEventStore();
  458.     }
  459. }
  460. var curServAlertCompNme = null;
  461. var curServAlertCompDesc = null;
  462. function processAlertServicesComputerLookup(CID,CNME,CDESC) {
  463.     curServAlertCompNme = CNME; // save Computer Name and Description
  464.     curServAlertCompDesc = CDESC;
  465.     goProcessLogRec(CID); // go process log record
  466.     goCheckServEventStore();
  467. }
  468. function goCheckServEventStore() {
  469.     var CompID = null; 
  470.     while ( VA_ServEventStore.length > 0 ) {
  471.         CompID = VA_ServEventStore.options[0].text; // get next entry
  472.         if ( getCompNameDesc(CompID) ) { // see if Computer already in local store
  473.             if ( !goProcessLogRec(CompID) ) // yes-go process immediately
  474.                 break;
  475.         }
  476.         else if ( !RpmCC_VA.ComputerLookupByIDArray(CompID) ) {
  477.             ALupMode = "AlertEvent"; 
  478.             VA_CommBusy = 1; // set Comm busy flag
  479.             return true; // exit now
  480.         }
  481.     }
  482.     ALupMode = ""; // reset
  483.     return false;
  484. }
  485. function    goProcessLogRec(CmpID) { //  process log record
  486.     /* Get Log Record from Store based on Computer ID */
  487.     for (var i=0; i < VA_ServEventStore.length; i+=ServEventRecLth) {
  488.         if ( VA_ServEventStore.options[i].text == CmpID ) {
  489.             outputLogEvent(null,VA_ServEventStore.options[i+1].text); // go process
  490.             for ( var j=0; j<ServEventRecLth; j++ ) { // remove from temporary store
  491.                 VA_ServEventStore.remove(i);   
  492.             }
  493.             return true;
  494.           }
  495.     }
  496.     return false;
  497. }
  498. /* Check Filter for Eligible Alert */
  499. function CheckAlertFilter(Agid,Tflg) {
  500.     if ( Tflg == null ) { // set serach time for Event if not specified
  501.        Tflg = ELogParams.logtime;
  502.           if ( Tflg == "0" ) { // get Start Time for Client
  503.            Tflg = top.banner.getLogStartTime();
  504.            ELogParams.logtime = Tflg;
  505.        }
  506.     }
  507.     return IsDisplayInLog(Agid,null,Tflg);// check if in Filter
  508. }        
  509.  
  510. /* Process Clear Log button click */
  511. function processClearButton() {
  512.     ELogWin.innerHTML = ELogWinInit; // clear log
  513.     WarningBox.style.display = "none";
  514.     /* Redefine Log Time based on Current Time */
  515.     var dob = new Date(); // get current d/t
  516.     var lt = (dob.getMonth()+1) + "/" + dob.getDate() + "/" + dob.getFullYear();
  517.     lt += " " + dob.getHours() + ":" + dob.getMinutes() + ":" + dob.getSeconds();
  518.     ELogParams.logtime = lt; // update the D/T stamp    
  519.     ELBgFlg = 0;
  520.    //ClearButton.className = "BoxButtonD"; // disable button
  521.    ClearButton.disabled = "disabled"; // disable button   
  522.    //StatusPrintButton.className = "BoxButtonD"; // disable button
  523.    StatusPrintButton.disabled = "disabled"; // disable button   
  524. }
  525.  
  526. /* Process Configure Button Click */
  527. function processConfigureButton() {
  528.     if ( ALupMode == "AlertEvent" )
  529.         return; // ignore, currently doing Computer Lookup
  530.    //ConfigButton.className = "BoxButtonD"; // disable button
  531.    ConfigButton.disabled = "disabled"; // disable button
  532.     PopUpDiv.style.display="";
  533.     AL_AlertSel.style.display = "";
  534.     if ( AL_AlertSel.length > 0 ) {
  535.         AL_AlertSel.options[0].selected = "selected";
  536.         populateInput(0);
  537.     }
  538.  
  539.     if ( lasthours.length == 0 ) {
  540.         for ( var i=0; i<25; i++ ) {
  541.             stxt = ""+i;
  542.             el = addElementToSelect(lasthours,stxt);
  543.             if ( i == MostRecentHours ) {
  544.                el.selected = "selected";
  545.             }
  546.         }
  547.     }
  548. }
  549.  
  550. function processDoneButton() {
  551.     ALupMode = ""; // reset
  552.     RpmCC_VA.RegSetKey(top.banner.ServerID+"SyslogDisplayLogFilterSave",ELogViewCur.innerHTML)
  553.     AL_AlertSel.style.display = "none";
  554.     PopUpDiv.style.display = "none";
  555.    //ConfigButton.className = "BoxButton"; // enable button
  556.    ConfigButton.disabled = ""; // enable button   
  557.     top.Rstatus.Pstat("");
  558. }
  559.  
  560. /* Process ViewCurrent and Hide Current Log Filter Button Clicks */
  561. function processViewCurrentButton() {
  562.       ELogWin.style.height=ELogWinSplitH;
  563.    vct = ELogViewCurLine.innerHTML;
  564.     ELogViewCurLine.style.display="";
  565.     ELogViewCurLine.innerHTML = vct;
  566.    //ViewCurrentButton.className = "BoxButtonD"; // disable button
  567.    ViewCurrentButton.disabled = "disabled"; // disable button
  568.     ELogViewCurLine.scrollIntoView(false);
  569. }
  570.  
  571. function processHideCurrentButton() {
  572.       ELogWin.style.height=ELogWinFullH;
  573.     ELogViewCurLine.style.display="none";
  574.    //ViewCurrentButton.className = "BoxButton"; // enable button
  575.    ViewCurrentButton.disabled = ""; // disable button
  576. }
  577.  
  578. /* Process Update Log Filter and Window */
  579. function processUpdateLogFilter(FilOp) {
  580.     if ( FilOp == "add" ) { // Add an entry to the Current View
  581.          FOps = "<div agrpid='" + CurAlertID + "' onclick='processLogFilterClick(this)' id='lf";
  582.          FOps += CurAlertID + "' style='background-color:white; cursor:hand'>"
  583.     }
  584.     else { // otherwise, Update an entry in the Current View
  585.           Fo = document.all["lf"+CurAlertID];
  586.         Fo.innerHTML = ""; // clear entry 
  587.         FOps = "";
  588.     }
  589.  
  590.     /* Accomodate Names Larger than Field Size */    
  591.     Fcon = "SYSLOG Alert";
  592.     if ( Fcon.length > 47 ) { // Object : Name
  593.         FconT = Fcon + "  /  "; // set for display in the title
  594.         Fcon = Fcon.substring(0,46) + "...";   
  595.     }
  596.     else {
  597.        FconT = ""; 
  598.     }
  599.     FconDesc = "";
  600.  
  601.     /* Output Parameters */
  602.     FOps += "<table border='0' cellpadding='0' cellSpacing='1' width='500'>";
  603.     FOps += "<tr><td width='50%' align='left' class='optext' style='cursor:hand' title='" + CurAlertDesc + "'>";
  604.     FOps += CurAlertName + "</td>";
  605.     FOps += "<td width='50%' align='left' class='optext' style='cursor:hand' title='" + FconT + FconDesc + "'>";
  606.     FOps += Fcon + "</td>";
  607.     FOps += "</tr></table>";
  608.  
  609.     if ( FilOp == "add" ) {
  610.         FOps += "</div>";
  611.         ELogViewCur.style.overflow = ( FilterRecCnt > 5 ) ? "scroll" : "";
  612.         ELogViewCur.insertAdjacentHTML("beforeEnd",FOps);
  613.     }
  614.     else {
  615.         Fo.insertAdjacentHTML("beforeEnd",FOps);
  616.     }
  617. }
  618.  
  619. /* Process Click on an Entry in the Log Filter Current View */
  620. var CurLflSelected = null;
  621. function processLogFilterClick(LFobj) {
  622.     if ( CurLflSelected != null ) {
  623.        document.all[CurLflSelected].style.backgroundColor = "white";
  624.     }
  625.     if ( CurLflSelected == LFobj.id ) { // if same line
  626.         //VC_DeleteButton.className = "BoxButtonD";
  627.         VC_DeleteButton.disabled = "disabled";
  628.         CurLflSelected = null;
  629.     }
  630.     else {
  631.         CurLflSelected = LFobj.id;
  632.         LFobj.style.backgroundColor = "scrollbar";
  633.         //VC_DeleteButton.className = "BoxButton";
  634.         VC_DeleteButton.disabled = "";
  635.     }
  636. }
  637.  
  638. /* Process Delete Button Click */
  639. function processDeleteEntryButton() {
  640.     if ( CurLflSelected != null ) { // if an entry is highlited
  641.         // delete highlited entry
  642.         CAid = document.all[CurLflSelected].agrpid; // get AlertGrp ID
  643.        document.all[CurLflSelected].outerText = ""; // clear entry
  644.         CurLflSelected = null; // reset to no selected entry
  645.           //VC_DeleteButton.className = "BoxButtonD"; // disable Delete button
  646.           VC_DeleteButton.disabled = "disabled"; // disable Delete button
  647.       
  648.        // clear entry from the Filter Store
  649.         FilObj = VA_FilterStore; // Filter Store
  650.         if ( getFilterEntry(CAid) == null ) // Find index to the entry in the Store
  651.             return; // if entry not found
  652.         for ( var i=0; i<FilterRecSize; i++ ) { // remove entry from the Store
  653.             FilObj.remove(FilterSelectIdx);
  654.         }
  655.        --FilterRecCnt; // adjust count
  656.         ELogViewCur.style.overflow = ( FilterRecCnt > 5 ) ? "scroll" : "";
  657.        // update save in Registry
  658.         RpmCC_VA.RegSetKey(top.banner.ServerID+"SyslogDisplayLogFilterSave",ELogViewCur.innerHTML)
  659.    }
  660. }
  661.  
  662. /* Process Show Event Button Click */
  663. var   FilterRecSize = 7; // Filter Record size
  664. function processApplyButton() {
  665.     var Scid = ""; // Computer ID Array
  666.     /* Create an array of selected computers */
  667.     for ( var i=0, j=0; i<CountOfComps; i++ ) { // Test each computer for Checked
  668.         if ( document.all["cmpa_"+i].checked == "1" ) {
  669.             if ( j > 0) {
  670.                Scid += ","; // array id separator
  671.             }
  672.             Scid += document.all["cmpa_"+i].cmpid; // save Computer ID
  673.             ++j;
  674.         }
  675.     }
  676.     if ( j == 0 ) {
  677.         CurLflSelected = "lf"+CurAlertID;
  678.         processDeleteEntryButton();
  679.         return;
  680.     }
  681.  
  682.     var nd = new Array();
  683.     ASdt = VA_StartDate.value; // Get Start Date
  684.     AEdt = VA_StopDate.value; // Get End Date
  685.     nd = ASdt.split(" ");
  686.     ASdt = nd[3] + " " + "0:0:0";
  687.     var Dob = new Date(ASdt); // Date object
  688.     Sms = Dob.getTime(); // Milliseconds since 1/1/70 0:0:0
  689.  
  690.     nd = AEdt.split(" ");
  691.     AEdt = nd[3] + " " + "23:59:59";
  692.     Dob = new Date(AEdt);
  693.     Ems = Dob.getTime(); // Milliseconds since 1/1/70 0:0:0
  694.  
  695.     /* See if entry already exists in the filter */
  696.     FilObj = VA_FilterStore; // Filter Store
  697.     if ( getFilterEntry(CurAlertID) != null ) { // if entry already in the filter
  698.         FilOp = "repl"; // Filter Update Op is Replace
  699.         i = FilterSelectIdx; // index to found entry
  700.         FilObj.options[i+1].text = Scid;    
  701.         FilObj.options[i+2].text = ASdt;
  702.         FilObj.options[i+3].text = Sms;    
  703.         FilObj.options[i+4].text = AEdt;    
  704.         FilObj.options[i+5].text = Ems;    
  705.         FilObj.options[i+6].text = curServName; // current Service Name if Service    
  706.     }
  707.     else { // otherwise, not yet in the Filter Store
  708.         FilOp = "add"; // Filter Update Op is Add
  709.         addElementToSelect(FilObj,CurAlertID); 
  710.         addElementToSelect(FilObj,Scid); 
  711.         addElementToSelect(FilObj,ASdt);
  712.         addElementToSelect(FilObj,Sms);
  713.         addElementToSelect(FilObj,AEdt);
  714.         addElementToSelect(FilObj,Ems);
  715.         addElementToSelect(FilObj,curServName); // current Service Name if Service
  716.         ++FilterRecCnt; // bump record count
  717.     }
  718.     /* Update Log Filter Window */
  719.     processUpdateLogFilter(FilOp);
  720.     
  721.     /* Initiate Read of Event Table for Events Matching Criteria if Counter */
  722.     if ( AL_AlertSel.style.display == "" && AL_AlertSel.style.visibility != "hidden") {
  723.         AL_AlertSel.focus(); // restore focus
  724.     }
  725. }
  726.  
  727. /* Search Filter Store for Given Alert Group ID */
  728. function getFilterEntry(AGID) {
  729.     FilObj = VA_FilterStore; // Filter Store
  730.     FilMax = FilterRecCnt * FilterRecSize;
  731.     for ( i=0; i<FilMax; i+=FilterRecSize ) {
  732.         if ( AGID == FilObj.options[i].text ) {
  733.             FilterSelectIdx = i; // save index
  734.             return i;
  735.         }
  736.     }
  737.     return null;
  738. }
  739.  
  740. // Validate Alert Filter
  741. function processValidateFilter() {
  742.     if ( ValidateFilter == false ) 
  743.         return; // exit if not needed
  744.     ValidateFilter = false; // reset
  745.     for ( var i=0; i<VA_FilterStore.length; i+=FilterRecSize ) {
  746.         // Check for valid Alert Group ID and that End D/T is greater than current D/T
  747.         if ( !IsValidAlertGroup(VA_FilterStore.options[i].text) ) {
  748.             // remove entry from Filter display
  749.            document.all["lf"+VA_FilterStore.options[i].text].outerText = ""; 
  750.              // remove entry from the Store
  751.             for ( var j=0; j<FilterRecSize; j++ ) {
  752.                 VA_FilterStore.remove(i);
  753.             }
  754.               --FilterRecCnt; // adjust count
  755.               i -= FilterRecSize; // adjust index for just deleted entry
  756.        }
  757.    }
  758.     ELogViewCur.style.overflow = ( FilterRecCnt > 5 ) ? "scroll" : "";
  759.       // update save in Registry
  760.     RpmCC_VA.RegSetKey(top.banner.ServerID+"SyslogDisplayLogFilterSave",ELogViewCur.innerHTML)
  761. }
  762. /* Check if Valid Alert Group ID */
  763. function IsValidAlertGroup(UID) {
  764.     for (var i=0; i < AlertStoreArr.length; i+=AlertRecLength) {
  765.         if ( AlertStoreArr[i+1] == UID ) {
  766.             return true;
  767.         }
  768.     }
  769.     return false;
  770. }
  771.  
  772.  
  773. /* Search Filter and Determine If Event Should Be Displayed */
  774. function IsDisplayInLog(AGID,CID,TS) {
  775.     // check if entry in Filter for Alert Group ID
  776.     if ( VA_FilterStore.length == 0 ) {
  777.         return true; // defaultto show everthing if no filter
  778.     }
  779.     if ( getFilterEntry(AGID) == null ) 
  780.          return false; // not in Filter
  781.  
  782.     // check if Computer ID in Array of Found Filter entry
  783.     if ( CID != null ) {
  784.         var CaR = new Array();
  785.         FilObj = VA_FilterStore; // Filter Store
  786.         CaR = FilObj.options[FilterSelectIdx+1].text.split(","); // Comp ID array
  787.         for ( var i=0; i<CaR.length; ++i ) {
  788.             if ( CID == CaR[i] ) // if match on Comp ID
  789.                 break;
  790.         }
  791.         if ( i>=CaR.length )
  792.              return false; // not in Filter
  793.      }        
  794.     // Specified parameters match a Filter entry
  795.     return true;
  796. }
  797.  
  798. var   EventRecCount = 0; // Count of temporary Event records 
  799. var    EventRecLength = 18; // Event record length
  800. var     EventSelectIdx = 0;
  801. function AlertEventLupRec1(EvID, EvTimStmp, EvValue, EvThresh, EvOver, EvDur, EvEmNotify, EvPhNotify, EvProNotify, EvPgNotify, EvObjNme, EvCntNme, EvCmpNme) {
  802.     StoreObj = VA_EventStore; // Storage
  803.     if ( IsEventExist(EvID) == false ) { // if not received yet
  804.         addElementToSelect(StoreObj,EvID); //+0
  805.         addElementToSelect(StoreObj,EvTimStmp);
  806.         addElementToSelect(StoreObj,EvCntNme);
  807.         addElementToSelect(StoreObj,EvObjNme);
  808.         addElementToSelect(StoreObj,EvCmpNme); 
  809.         addElementToSelect(StoreObj,EvValue); //+5
  810.         addElementToSelect(StoreObj,EvEmNotify); 
  811.         addElementToSelect(StoreObj,EvPhNotify); 
  812.         addElementToSelect(StoreObj,EvProNotify); 
  813.         addElementToSelect(StoreObj,EvPgNotify); //+9
  814.         addElementToSelect(StoreObj,EvThresh); 
  815.         addElementToSelect(StoreObj,EvOver); 
  816.         addElementToSelect(StoreObj,EvDur); //+12
  817.         /* allocate space for Part 2 */
  818.         addElementToSelect(StoreObj,""); //+13
  819.         addElementToSelect(StoreObj,"");
  820.         addElementToSelect(StoreObj,"");
  821.         addElementToSelect(StoreObj,"");
  822.         addElementToSelect(StoreObj,""); //+17
  823.     }
  824.     else { // already received Part 2, update Part 1
  825.         ESix = EventSelectIdx * EventRecLength;
  826.         StoreObj.options[ESix+0].text = EvID;
  827.         StoreObj.options[ESix+1].text = EvTimStmp;
  828.         StoreObj.options[ESix+2].text = EvCntNme;
  829.         StoreObj.options[ESix+3].text = EvObjNme;
  830.         StoreObj.options[ESix+4].text = EvCmpNme;
  831.         StoreObj.options[ESix+5].text = EvValue;
  832.         StoreObj.options[ESix+6].text = EvEmNotify; 
  833.         StoreObj.options[ESix+7].text = EvPhNotify; 
  834.         StoreObj.options[ESix+8].text = EvProNotify; 
  835.         StoreObj.options[ESix+9].text = EvPgNotify; //+9
  836.         StoreObj.options[ESix+10].text = EvThresh; 
  837.         StoreObj.options[ESix+11].text = EvOver; 
  838.         StoreObj.options[ESix+12].text = EvDur; //+12
  839.         outputLogEvent(StoreObj,ESix); // go output to Log Window if eligible
  840.         for ( var i=0; i<EventRecLength; i++ ) { // remove from temporary store
  841.             StoreObj.remove(ESix);   
  842.         }
  843.     }
  844. }
  845.  
  846. function AlertEventLupRec2(EvID, EvAlertID, EvValueID, EvAlGrpID, EvObjID, EvCntrID, EvCmpID, EvGrpID, EvServerID, EvObjDesc, EvCntrDesc, EvCmpDesc, EvOSver) {
  847.     StoreObj = VA_EventStore; // Storage
  848.     if ( IsEventExist(EvID) == false ) { // if not received yet
  849.         // allocate space for Part 1
  850.         addElementToSelect(StoreObj,EvID); //+0
  851.         addElementToSelect(StoreObj,"");
  852.         addElementToSelect(StoreObj,"");
  853.         addElementToSelect(StoreObj,"");
  854.         addElementToSelect(StoreObj,""); 
  855.         addElementToSelect(StoreObj,""); //+5
  856.         addElementToSelect(StoreObj,""); 
  857.         addElementToSelect(StoreObj,""); 
  858.         addElementToSelect(StoreObj,""); 
  859.         addElementToSelect(StoreObj,""); //+9
  860.         addElementToSelect(StoreObj,""); 
  861.         addElementToSelect(StoreObj,""); 
  862.         addElementToSelect(StoreObj,""); //+12 
  863.         /* save Part 2 */
  864.         addElementToSelect(StoreObj,EvCmpID); //+13
  865.         addElementToSelect(StoreObj,EvAlGrpID); 
  866.         addElementToSelect(StoreObj,EvObjDesc);
  867.         addElementToSelect(StoreObj,EvCntrDesc);
  868.         addElementToSelect(StoreObj,EvCmpDesc); //+17
  869.     }
  870.     else { // already received Part 1, update Part 2
  871.         ESix = EventSelectIdx * EventRecLength;
  872.         StoreObj.options[ESix+13].text = EvCmpID;
  873.         StoreObj.options[ESix+14].text = EvAlGrpID;
  874.         StoreObj.options[ESix+15].text = EvObjDesc;
  875.         StoreObj.options[ESix+16].text = EvCntrDesc;
  876.         StoreObj.options[ESix+17].text = EvCmpDesc;
  877.         outputLogEvent(StoreObj,ESix); // go output to Log Window if eligible
  878.         for ( var i=0; i<EventRecLength; i++ ) { // remove from temporary store
  879.             StoreObj.remove(ESix);   
  880.         }
  881.     }
  882. }
  883.  
  884. var LogEventBsy = false;
  885. /* Check if Event Passes Filter Test and if so, Output to Log Window */
  886. function outputLogEvent(ESObj,ESx) {
  887.     if ( ESObj != null ) 
  888.         return;
  889.     var warr = new Array();
  890.       var SLRec = new Array();
  891.     SLRec = ESx.split("~"); // parse the Log Record
  892.       if ( SLRec[0] == "SyslogCheckLog" ) { // process Syslog Check Alert
  893.         EGid = SLRec[4]; // Alert Group ID
  894.         ECmn = curServAlertCompNme; // Computer Name
  895.         ECmd = curServAlertCompDesc; // Cmp Desc
  896.         EOn = EOvr = ""; // Obj Name, Over 
  897.         warr = SLRec[10].split("/"); // Time Stamp
  898.         warr[0] = ""+parseInt(warr[0],10);
  899.         warr[1] = ""+parseInt(warr[1],10);
  900.         ETs = warr.join("/");
  901.         Eid = SLRec[1]+"~"+SLRec[4]; // Event ID 
  902.         Ev = GetFacility(SLRec[5])+" / "+GetSeverity(SLRec[6]); // Status Code 
  903.         warr.length =0;
  904.         warr = SLRec[9].split("'"); 
  905.         SLRec[9] = warr.join("`");
  906.     }
  907.     // Go do audio alert if enabled
  908.     processAlertAudioOut(); // process AudioAlert
  909.  
  910.     /* Accomodate Names Larger than Field Size */    
  911.     if ( ECmn.length > 30 ) { // Computer Name
  912.         ECmnT = ECmn + "  / "; // set for display in the title
  913.         ECmn = ECmn.substring(0,30) + "...";   
  914.     }
  915.     else {
  916.        ECmnT = "";
  917.     }
  918.     if ( ECmd.charAt(ECmd.length-1) == "." ) {
  919.         ECmd = ECmd.substring(0,ECmd.length-1);
  920.     }
  921.     ECmnT +=  ECmd;
  922.     
  923.     if ((ELBgFlg ^= 1) == 0) {
  924.         FOps = "<div style='background-color:white'>";
  925.     }
  926.     else {
  927.         FOps = "<div style='background-color:e8e8e8'>";
  928.     }
  929.     FOps += "<table border='0' cellpadding='0' cellSpacing='1' width='100%'";
  930.     if ( EOvr == "0") { // if Event over threshold
  931.         FOps += " style='color:red'";
  932.     }
  933.     FOps += "><tr>";    
  934.     FOps += "<td width='155' colspan='1' align='left' class='optext' style='cursor:hand' title='" + ECmnT + "'>";
  935.     FOps += ECmn + "</td>";
  936.     FOps += "<td width='95' colspan='1' align='left' class='optext'>";
  937.     FOps += SLRec[8] + "</td>";
  938.     FOps += "<td width='104' colspan='1' align='left' class='optext'>";
  939.     FOps += ETs + "</td>";
  940.     FOps += "<td width='124' colspan='1' align='left' class='optext'>";
  941.     FOps += Ev + "</td>";
  942.     FOps += "<td width='*' colspan='1' align='left' class='optext'>";
  943.     FOps += SLRec[9] + "</td>"
  944.     FOps += "</tr></table></div>";
  945.     ELogText.insertAdjacentHTML("afterBegin",FOps);
  946.     //ELogWin.scrollIntoView();
  947.     ELogParams.logeventid += Eid + ","; // update the Event ID Array
  948.    //ClearButton.className = "BoxButton"; // enable button
  949.    ClearButton.disabled = ""; // enable button   
  950.    //StatusPrintButton.className = "BoxButton"; // enable button
  951.    StatusPrintButton.disabled = ""; // enable button   
  952.    LogEventBsy = false; // set free
  953. }
  954.  
  955. /* Get Alert Name from Store based on Alert ID */
  956. function getAlertNameSpecial(UID) {
  957.     AlertName = "";
  958.     for (i=0, j=0; i < AlertStoreArr.length; ++j, i+=AlertRecLength) {
  959.         if ( AlertStoreArr[i+1] == UID ) {
  960.             AlertName = AlertStoreArr[i];
  961.             AlertSelectIdx = j;
  962.             break;
  963.         }
  964.     }
  965.     return AlertName;
  966. }
  967.  
  968. /* Get Event Name from Store based on Event ID */
  969. function IsEventExist(EID) {
  970.     ENobj = VA_EventStore; // get object
  971.     for (var i=0, j=0; i < ENobj.length; ++j, i+=EventRecLength) {
  972.         if ( ENobj.options[i].text == EID ) {
  973.             EventSelectIdx = i;
  974.             return true;
  975.           }
  976.     }
  977.     return false;
  978. }
  979.  
  980. /* Process Populate Configure Edit Fields */
  981. var Tops = ""; // output string
  982. var SBObj = null; // SelectBox Object for output
  983. var CkCArr = new Array(); // "Checked" Computers array
  984. var curServName = null; // Current Service Name
  985. var CTparm = "optext"; // Computer Text Color
  986. var CurrentAlertType = null;
  987. function populateInput(idx) {
  988.     SetCursor("wait");
  989.     setSelectAll(false); // disable Select/UnselectAll buttons
  990.     CurAlertName = AlertStoreArr[idx];
  991.     CurAlertID = AlertStoreArr[idx+1];
  992.     CurAlertDesc = AlertStoreArr[idx+2];
  993.     CkCArr.length = 0; // init checked computer array
  994.     curServName = ""; // initialize
  995.     CountOfComps = 0; // clear
  996.     // If Service, preset Start and End D to today
  997.     var dob = new Date(); // get current d/t
  998.     var calt = AlertStoreArr[idx+10];
  999.     AlertStoreArr[idx+10] = "SyslogCheck";
  1000.     CurrentAlertType = "L"; // "File Check" type
  1001.             
  1002.     /* Check if Entry exists in the Filter */
  1003.     FilObj = VA_FilterStore; // Filter Store
  1004.     if ( getFilterEntry(CurAlertID) != null ) { // if entry in the filter
  1005.         i = FilterSelectIdx; // index to found entry
  1006.         CkCArr = FilObj.options[i+1].text.split(","); // get checked CIDs
  1007.         
  1008.         msec = eval(FilObj.options[i+3].text);
  1009.         dob = new Date(msec);
  1010.         AlertStoreArr[idx+8] = (dob.getMonth()+1) + "/" + dob.getDate() + "/" + dob.getFullYear() + " " + dob.getHours()+":"+dob.getMinutes()+":"+dob.getSeconds();
  1011.         msec = eval(FilObj.options[i+5].text);
  1012.         dob = new Date(msec);    
  1013.         AlertStoreArr[idx+9] = (dob.getMonth()+1) + "/" + dob.getDate() + "/" + dob.getFullYear() + " " + dob.getHours()+":"+dob.getMinutes()+":"+dob.getSeconds();
  1014.     }
  1015.     
  1016.     /* Determine Start D */
  1017.     i = AlertStoreArr[idx+8];
  1018.     Ia = i.split(" "); // get Start date and time
  1019.     var Ib = new Array();
  1020.     Ib = Ia[0].split("/");
  1021.     dob = new Date(Ib[2],(Ib[0]-1),Ib[1]);
  1022.     VA_StartDate.value = " " + dowArray[dob.getDay()] + "  " + Ia[0]; // Date
  1023.     baseDay = dob.getDate(); // Set base date based on Start Date
  1024.     baseMonth = dob.getMonth();
  1025.     baseYear = dob.getFullYear();
  1026.  
  1027.     /* Determine Stop D */
  1028.     i = AlertStoreArr[idx+9];
  1029.     Ia = i.split(" "); // get Stop date and time
  1030.     Ib = Ia[0].split("/");
  1031.     dob = new Date(Ib[2],(Ib[0]-1),Ib[1]);
  1032.     VA_StopDate.value = " " + dowArray[dob.getDay()] + "  " + Ia[0]; // Date
  1033.  
  1034.    /* setup Object:Counter info for display */
  1035.    SBObj = VA_Select;
  1036.     SBObj.innerHTML = ""; // clear current display
  1037.  
  1038.     if ( CurrentAlertType == "L" ) { // if Syslog Check
  1039.         if ( RpmCC_VA.SyslogCheckLookup(CurAlertID) ) {
  1040.             ALupMode = "";
  1041.             top.Rstatus.Pstat("Unable to start the Syslog Check lookup request",true);
  1042.         }
  1043.         else {
  1044.             VA_CommBusy = 1; // set Comm busy flag
  1045.             CountOfCompsRcvd = 0; 
  1046.             CompIdLupArr = ""; // Computer Id Array
  1047.             ALupMode = "SLComputerLookupPopIn"; // Mode
  1048.             top.Rstatus.Pstat("One moment while Syslog Check Computer lookup request completes");
  1049.         }
  1050.     }
  1051. }
  1052. function setSelectAll(sFlag) {
  1053.     if ( sFlag ) { 
  1054.        SButtonState(bSelC,"0");
  1055.        SButtonState(bUselC,"0");
  1056.    }
  1057.    else { // otherwise disable the buttons
  1058.        SButtonState(bSelC,"1");
  1059.        SButtonState(bUselC,"1");
  1060.    }
  1061. }
  1062. function SButtonState(BtObj,BState) {
  1063.     //BtObj.className = (BState == "0") ? "BoxButton" : "BoxButtonD";
  1064.     BtObj.disabled = (BState == "0") ? "" : "disabled";
  1065. }
  1066.  
  1067. var CountOfCompsRcvd = 0;
  1068. function processSLLookupOpComplete(SLLStat) {
  1069.     var wrkarr = new Array();
  1070.     wrkarr = SLLStat.split(":"); // parse the lookup record
  1071.     if ( wrkarr[0] == "Err" ) {
  1072.         ALMode = ""; // reset mode
  1073.         top.Rstatus.Pstat(SLLStat,true);
  1074.         return;
  1075.     }
  1076.     wrkarr = SLLStat.split(";"); // parse the lookup record
  1077.     CompIdLupArr = wrkarr[1]; // get Computer ID array
  1078.     wrkarr = CompIdLupArr.split(",");
  1079.     CountOfCompsRcvd = wrkarr.length;
  1080.     if ( CountOfCompsRcvd > 0 ) {
  1081.         MaxCmpCount = CountOfCompsRcvd;
  1082.         SBObj.style.overflow = ( CountOfCompsRcvd > 4 ) ? "scroll" : "";
  1083.         Tops = "<table border='0' cellpadding='0' cellSpacing='0' width='350'>";
  1084.         Tops += "<tr><td width='5'> </td>";
  1085.         Tops += "<td width='19' align='center'><img src='images/SyslogDisplaySm.gif' width='16' height='16'></td>";
  1086.         Tops += "<td width='*' class='optext'>SYSLOG Watch</td>";
  1087.         Tops += "</tr></table>";
  1088.         CountOfComps = 0; // initialize
  1089.         ALupMode = "EventPopIn";
  1090.         processPopulateInputCounterOpComplete(); // Start lookup for Computer Names/Descriptions
  1091.     }
  1092.     else {
  1093.         ALMode = ""; // reset mode
  1094.         top.Rstatus.Pstat("No associated computers found for this SYSLOG alert",true);
  1095.     }
  1096. }
  1097.  
  1098. /* OpComplete for the CounterLookupForObjCounterArray */
  1099. var CountOfComps = 0;
  1100. var MaxCmpCount = 0;
  1101. var CompIdLupArr = "";
  1102. function processPopulateInputCounterOpComplete() {
  1103.     if ( PopUpDiv.style.display == "none" )
  1104.         return; // exit if Configure Window no longer present
  1105.     /* Lookup Computer Names and Descriptions */
  1106.     if ( RpmCC_VA.ComputerLookupByIDArray(CompIdLupArr) ) {
  1107.         top.Rstatus.Pstat("Unable to start the Computer LOOKUP request",true);
  1108.         ALupMode = ""; // reset
  1109.     }
  1110.     else {
  1111.         VA_CommBusy = 1; // set Comm busy flag
  1112.         CountOfComps = 0; 
  1113.         top.Rstatus.Pstat("One moment while lookup request completes");
  1114.     }
  1115. }
  1116.  
  1117. function processPopulateInputComputer(Cid,CmpNme,CmpDesc) {
  1118.     if ( PopUpDiv.style.display == "none" )
  1119.         return; // exit if Configure Window no longer present
  1120.     /* Format Computer Name and Description */
  1121.         if ( CountOfComps+1 == MaxCmpCount ) { // if Last Computer for Display
  1122.            lineGIF = "L";
  1123.         }
  1124.         else {
  1125.              lineGIF = "T";
  1126.         } 
  1127.         /* if using from Filter Entry, determine if Checked */
  1128.         CkdS = "' checked='0' src='images/Unchecked.gif'"; // default
  1129.         var CImg = "Computer";
  1130.         if ( CkCArr.length > 0 ) { // if from Filter
  1131.             for ( var i=0; i<CkCArr.length; i++ ) {
  1132.                 if ( Cid == CkCArr[i] ) { // if this matches a Checked one
  1133.                      break;
  1134.                 }
  1135.             }
  1136.             if ( i < CkCArr.length ) { // if match versus Checked Array of IDs
  1137.                 CkdS = "' checked='1' src='images/Checked.gif'";
  1138.                 CImg = "SyslogDisplaySm";
  1139.             }
  1140.         }
  1141.         Tops += "<table border='0' cellpadding='0' cellSpacing='0' width='350'>";
  1142.         Tops += "<tr><td width='39' height='20' align='right'><img src='images/" + lineGIF +".gif' width='19' height='20'></td>";
  1143.           Tops += "<td width='11' align='center'><img id='cmpa_" + CountOfComps;
  1144.           Tops += "' cmpid='" + Cid + CkdS;
  1145.           Tops += " style='cursor:hand' onclick='procCompImgClick(this)' width='9' height='9'></td>";
  1146.         Tops += "<td width='19' align='center'><img id='cmpb_" + CountOfComps;
  1147.         Tops += "' src='images/"+CImg+".gif' style='cursor:hand' onclick='procCompImgClick(this)' width='14' height='16' title='";
  1148.         Tops += CmpDesc + "'></td>";
  1149.         Tops += "<td width='*' class='"+CTparm+"'>" + CmpNme + "</td>";
  1150.         Tops += "</tr></table>";
  1151.         ++CountOfComps; // bump index
  1152. }
  1153.  
  1154. function processPopulateInputOpComplete() {
  1155.     /* Final Format and Output */
  1156.     if ( PopUpDiv.style.display == "none" )
  1157.         return; // exit if Configure Window no longer present
  1158.     ALupMode = ""; // reset
  1159.     SBObj.insertAdjacentHTML("beforeEnd",Tops);
  1160.  
  1161.     //DoneButton.className = "BoxButton"; // enable button
  1162.     DoneButton.disabled = ""; // enable button
  1163.     setSelectAll(true); // enable Select/UnselectAll buttons
  1164.     SetCursor("auto");    
  1165.     if ( AL_AlertSel.style.display == "" && AL_AlertSel.style.visibility != "hidden") {
  1166.         top.Rstatus.Pstat("Request Completed");
  1167.  
  1168.         AL_AlertSel.focus(); // restore focus
  1169.     }
  1170. }
  1171.  
  1172. function procUsrAltClick(CObj) {
  1173.     if ( CObj.id != "usralt0" ) 
  1174.                 return;
  1175.     if ( CObj.checked == "1" ) { // if currently Checked, Uncheck
  1176.         usralt1.src = "images/Unchecked.gif";
  1177.        CObj.checked = "0"; // Set Unchecked
  1178.    }
  1179.     else { // otherwise Check
  1180.         usralt1.src = "images/Checked.gif";
  1181.        CObj.checked = "1"; // Set Checked
  1182.     }
  1183.     processApplyButton();
  1184. }
  1185.  
  1186. /* Process Click on Computer Image */
  1187. function procCompImgClick(COb) {
  1188.     isx = COb.id;  
  1189.     if ( isx.charAt(0) != "c" ) // if not a "cmpa_xx"
  1190.                 return;
  1191.     var cx = isx.substring(5,isx.length); // Strip off index
  1192.     CObj = document.all["cmpa_"+cx]; // Clicked Computer Entry
  1193.     var CIObj = document.all["cmpb_"+cx]; // Clicked Computer Entry Image
  1194.     
  1195.     if ( CObj.checked == "1" ) { // if currently Checked, Uncheck
  1196.         CObj.src = "images/Unchecked.gif";
  1197.        CObj.checked = "0"; // Set Unchecked
  1198.        CIObj.src = "images/Computer.gif";
  1199.    }
  1200.     else { // otherwise Check
  1201.         if ( CTparm == "optextr" ) { // if Suspended, don't add to filter
  1202.             top.Rstatus.Pstat("Alert is currently Suspended",true);    
  1203.             if ( AL_AlertSel.style.display == "" && AL_AlertSel.style.visibility != "hidden") {
  1204.                 AL_AlertSel.focus(); // restore focus
  1205.             }
  1206.             return;
  1207.         }
  1208.         CObj.src = "images/Checked.gif";
  1209.        CObj.checked = "1"; // Set Checked
  1210.        CIObj.src = "images/SyslogDisplaySm.gif";
  1211.     }
  1212.     if ( arguments.length == 1 ) {
  1213.         processApplyButton();
  1214.     }
  1215. }
  1216. // compensate for IE 5.x bug
  1217. function hideAlertSel() {
  1218.     Tid = null;
  1219.     AL_AlertSel.style.display = "none";
  1220. }
  1221.  
  1222. // Add Computer to Store if Not Already
  1223. var CompRecLength = 3;
  1224. function processCompAddToStore(CNme,CDesc,Cid) {
  1225.     for ( var i=0; i<AC_CompStoreArr.length; i+=CompRecLength ) {
  1226.         if ( Cid == AC_CompStoreArr[i] ) { // if in Store, skip it
  1227.             return;
  1228.         }
  1229.     }
  1230.     // Not in Store, Add now
  1231.     AC_CompStoreArr[i++] = Cid; 
  1232.     AC_CompStoreArr[i++] = CNme; 
  1233.     AC_CompStoreArr[i] = CDesc; 
  1234. }
  1235. var curCompDesc = "";
  1236. function getCompNameDesc(CompID) {
  1237.     for ( var i=0; i<AC_CompStoreArr.length; i+=CompRecLength ) {
  1238.         if ( CompID == AC_CompStoreArr[i] ) { // if in Store
  1239.             // save Computer Name and Description
  1240.             curServAlertCompDesc = AC_CompStoreArr[i+2];
  1241.             curServAlertCompNme = AC_CompStoreArr[i+1]; 
  1242.             return true;
  1243.         }
  1244.     }
  1245.     return false;
  1246. }
  1247.  
  1248. // Process to Toggle the Hide and Show of the Banner & Menu Frames
  1249. var hideToggle = 0;
  1250. var TitleDivSize = 100;
  1251. function processBannerMenu() {
  1252.     if ( hideToggle == 0 ) {
  1253.         top.BannerMenuHide(); hideToggle = 1;   
  1254.         ViewAlertsTitleDiv.style.display = "none"; 
  1255.         TitleDivSize = 56; 
  1256.     }
  1257.     else {
  1258.         top.BannerMenuShow(); hideToggle = 0;   
  1259.         ViewAlertsTitleDiv.style.display = "";  
  1260.         TitleDivSize = 100;
  1261.     }   
  1262. }
  1263.  
  1264. // Process SelectALL or UnselectALL
  1265. function processSelect(Pflg) {
  1266.     var CObj = null;
  1267.     for ( var j=0, i=0; j<CountOfComps; j++ ) {
  1268.         CObj = document.all["cmpa_"+j]; // computer entry in tree
  1269.         if (CObj.checked == Pflg) {
  1270.             procCompImgClick(CObj,true); // go process
  1271.             ++i; // bump number changed
  1272.         }
  1273.     }
  1274.     if ( i > 0 ) {
  1275.         processApplyButton();
  1276.     }
  1277.     if ( AL_AlertSel.style.display == "" && AL_AlertSel.style.visibility != "hidden") {
  1278.         AL_AlertSel.focus(); // restore focus
  1279.     }
  1280. }
  1281.     
  1282. // Null funcs
  1283. function    processResetButton() { 
  1284.     top.banner.processStopCommX(); 
  1285. }
  1286. function    checkEnableSchedButton() { 
  1287. }
  1288.  
  1289. function PopUpContextOpen() {
  1290.     AL_AlertSel.style.visibility = "hidden";
  1291. }
  1292. function PopUpContextClose() {
  1293.     AL_AlertSel.style.visibility = "visible";
  1294. }
  1295.  
  1296. function GetFacility(FacCode)
  1297. {
  1298.     var csFacility;
  1299.     switch ( parseInt(FacCode) )
  1300.     {
  1301.     case 0: csFacility = "Kernel"; break;
  1302.     case 1: csFacility = "User-Level"; break;
  1303.     case 2: csFacility = "Mail System"; break;
  1304.     case 3: csFacility = "System Daemons"; break;
  1305.     case 4: csFacility = "Security/Authorization (4)"; break;
  1306.     case 5: csFacility = "Internal by Syslogd"; break;
  1307.     case 6: csFacility = "Line Printer Subsystem"; break;
  1308.     case 7: csFacility = "Network News Subsystem"; break;
  1309.     case 8: csFacility = "UUCP Subsystem"; break;
  1310.     case 9: csFacility = "Clock Daemon (9)"; break;
  1311.     case 10: csFacility = "Security/Authorization (10)"; break;
  1312.     case 11: csFacility = "FTP Daemon"; break;
  1313.     case 12: csFacility = "NTP Subsystem"; break;
  1314.     case 13: csFacility = "Log Audit"; break;
  1315.     case 14: csFacility = "Log Alert"; break;
  1316.     case 15: csFacility = "Clock Daemon (15)"; break;
  1317.     case 16: csFacility = "Local Use 0"; break;
  1318.     case 17: csFacility = "Local Use 1"; break;
  1319.     case 18: csFacility = "Local Use 2"; break;
  1320.     case 19: csFacility = "Local Use 3"; break;
  1321.     case 20: csFacility = "Local Use 4"; break;
  1322.     case 21: csFacility = "Local Use 5"; break;
  1323.     case 22: csFacility = "Local Use 6"; break;
  1324.     case 23: csFacility = "Local Use 7"; break;
  1325.     default:
  1326.         csFacility = FacCode;
  1327.     }
  1328.     return csFacility;
  1329. }
  1330.  
  1331. function GetSeverity(SevCode)
  1332. {
  1333.     var csSeverity;
  1334.     switch ( parseInt(SevCode,10) )
  1335.     {
  1336.     case 0: csSeverity = "Emergency"; break;
  1337.     case 1: csSeverity = "Alert"; break;
  1338.     case 2: csSeverity = "Critical"; break;
  1339.     case 3: csSeverity = "Error"; break;
  1340.     case 4: csSeverity = "Warning"; break;
  1341.     case 5: csSeverity = "Notice"; break;
  1342.     case 6: csSeverity = "Informational"; break;
  1343.     case 7: csSeverity = "Debug"; break;
  1344.     default:
  1345.         csSeverity = SevCode;
  1346.     }
  1347.     return csSeverity;
  1348. }
  1349.  
  1350. //-->
  1351. </script>
  1352.  
  1353. <script LANGUAGE="JAVASCRIPT" SRC="js/Calendar.js" PURPOSE="COMPONENT" CLASSNAME="com.netobjects.Calendar"></script>
  1354. <script LANGUAGE="JavaScript" src="js/MiscFunc.js"></script>
  1355. <script LANGUAGE="JavaScript" src="js/ButtonFunc.js"></script>
  1356. <script LANGUAGE="JavaScript" src="js/CalendarTimeFunc.js"></script>
  1357. <script LANGUAGE="JavaScript" src="js/AlertFunc.js"></script>
  1358. <script LANGUAGE="JavaScript" src="js/WinServicesFunc.js"></script>
  1359.  
  1360. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="Connected()">
  1361. <!--
  1362. processConnectConfirmed();
  1363. //-->
  1364. </script> 
  1365.  
  1366. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="DBChanged(cdata)">
  1367. <!--
  1368. var warr = new Array();
  1369. warr = cdata.split("~"); // parse the event data
  1370. // Ignore if Server Table change
  1371. if ( warr[0] == "4" ) 
  1372.     return; // ignore
  1373. top.Rstatus.StatDB.style.display = "";
  1374. if ( CTid == null ) {
  1375.     CTid = setTimeout("processDBChanged()",30000); // Delay 30 secs then process
  1376. }
  1377. //-->
  1378. </script>
  1379.  
  1380. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="Disconnected()">
  1381. <!--
  1382. top.Rstatus.Pstat("Disconnected",true);
  1383. if ( Tid != null ) {
  1384.     clearTimeout(Tid); // stop timeout routine
  1385. }
  1386. Tid = setTimeout("processReconnect()",10000); // Delay 10 secs then try reconnnect
  1387. //-->
  1388. </script>
  1389.  
  1390. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="SyslogCheckLogLookup(SLLogRec)">
  1391. <!--
  1392. WarningBox.style.display = "none";
  1393. WarningBox1.style.display = "none";
  1394. if ( SLLogRec == "GetLast" ) {
  1395.     WarningBox1.style.display = "";   
  1396. }
  1397. else {
  1398.     processAlertSyslogCheckRecord(SLLogRec);
  1399. }
  1400. //-->
  1401. </script> 
  1402.  
  1403. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="SyslogCheckLookup(SLLStat)">
  1404. <!--
  1405. processSLLookupOpComplete(SLLStat);
  1406. //-->
  1407. </script> 
  1408.  
  1409.  
  1410. <script LANGUAGE="JavaScript" FOR="RpmCC_VA"
  1411. EVENT="AlertGroupLookupRecordPart1(AlID, AlName, AlDesc, AlThresh, AlOver, AlEveryTime, AlDur, AlSched, AlSDT, AlEDT, AlArrayIDs)">
  1412. <!--
  1413. AlertLupRecPart1(AlID, AlName, AlDesc, AlThresh, AlOver, AlEveryTime, AlDur, AlSched, AlSDT, AlEDT, AlArrayIDs);
  1414. //-->
  1415. </script>
  1416.  
  1417. <script LANGUAGE="JavaScript" FOR="RpmCC_VA"
  1418. EVENT="AlertGroupLookupRecordPart2(AlID, AlRunProg, AlProgNme, AlProgramArgs, AlENotify, AlEAddr, AlESubj, AlPhNotify, AlPhNumber, AlTextToSpeak, AlPgNotify, AlPgNumber, AlTextToSend)">
  1419. <!--
  1420. AlertLupRecPart2(AlID, AlRunProg, AlProgNme, AlProgramArgs, AlENotify, AlEAddr, AlESubj, AlPhNotify, AlPhNumber, AlTextToSpeak, AlPgNotify, AlPgNumber, AlTextToSend);
  1421. //-->
  1422. </script>
  1423.  
  1424. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="AlertGroupOpComplete()">
  1425. <!--
  1426. processAlertOpComplete();
  1427. VA_CommBusy = 0; // reset Comm busy flag
  1428. //-->
  1429. </script> 
  1430.  
  1431. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="AlertGroupOpError()">
  1432. <!--
  1433. processAlertOpError();
  1434. VA_CommBusy = 0; // reset Comm busy flag
  1435. //-->
  1436. </script> 
  1437.  
  1438. <script LANGUAGE="JavaScript" FOR="RpmCC_VA"
  1439. EVENT="AlertEventLookupRecord1(EvID, EvTimStmp, EvValue, EvThresh, EvOver, EvDur, EvEmNotify, EvPhNotify, EvProNotify, EvPgNotify, EvObjNme, EvCntNme, EvCmpNme)">
  1440. <!--
  1441. AlertEventLupRec1(EvID, EvTimStmp, EvValue, EvThresh, EvOver, EvDur, EvEmNotify, EvPhNotify, EvProNotify, EvPgNotify, EvObjNme, EvCntNme, EvCmpNme);
  1442. //-->
  1443. </script>
  1444.  
  1445. <script LANGUAGE="JavaScript" FOR="RpmCC_VA"
  1446. EVENT="AlertEventLookupRecord2(EvID, EvAlertID, EvValueID, EvAlGrpID, EvObjID, EvCntrID, EvCmpID, EvGrpID, EvServerID, EvObjDesc, EvCntrDesc, EvCmpDesc, EvOSver)">
  1447. <!--
  1448. AlertEventLupRec2(EvID, EvAlertID, EvValueID, EvAlGrpID, EvObjID, EvCntrID, EvCmpID, EvGrpID, EvServerID, EvObjDesc, EvCntrDesc, EvCmpDesc, EvOSver);
  1449. //-->
  1450. </script>
  1451.  
  1452. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ComputerLookupRecord(Cid,Gid,SrvID,Nme,Desc,Pswd,OSVer,Addr,Port)">
  1453. <!--
  1454. processCompAddToStore(Nme,Desc,Cid);
  1455. if ( ALupMode == "AlertEvent" ) {
  1456.     processAlertServicesComputerLookup(Cid,Nme,Desc);
  1457. }
  1458. else if ( ALupMode == "EventPopIn" ) {
  1459.     processPopulateInputComputer(Cid,Nme,Desc);
  1460. }
  1461. //-->
  1462. </script> 
  1463.  
  1464. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ComputerOpComplete()">
  1465. <!--
  1466. if ( ALupMode == "EventPopIn" ) {
  1467.     processPopulateInputOpComplete();
  1468. }
  1469. VA_CommBusy = 0; // reset Comm busy flag
  1470. //-->
  1471. </script> 
  1472.  
  1473. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ComputerOpError()">
  1474. <!--
  1475. processComputerOpError();
  1476. VA_CommBusy = 0; // reset Comm busy flag
  1477. //-->
  1478. </script> 
  1479.  
  1480. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="StartCommunication()">
  1481. <!--
  1482. top.banner.processStartComm();
  1483. //-->
  1484. </script> 
  1485.  
  1486. <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="StopCommunication()">
  1487. <!--
  1488. top.banner.processStopComm();
  1489. //-->
  1490. </script> 
  1491.  
  1492. <script LANGUAGE="JavaScript" src="js/PopUpMenuFunc.js"></script>
  1493.  
  1494. <object ID="RpmCC_VA" NAME="RpmCC_VA" WIDTH="14" HEIGHT="1" style="display:none"
  1495. CLASSID="CLSID:D88C2358-FC83-11D1-BF49-00104B2D6F80" CODEBASE="controls/RPMComm.cab#version=5,2,0,0">
  1496.   <param name="_Version" value="65536">
  1497.   <param name="_ExtentX" value="2646">
  1498.   <param name="_ExtentY" value="1341">
  1499.   <param name="_StockProps" value="0">
  1500. </object>
  1501.  
  1502. <!-- Invisible Object to Support Simulated Click Event -->
  1503. <button id="FakeBut" style="display:none" onclick="top.banner.savePageCoord(event,document.body,'ViewSyslogDisplay')">
  1504. </button>
  1505.  
  1506. <!-- Define Images used in dynamic HTML generation to force loading and caching now -->
  1507. <div style="display:none">
  1508. <img src="images/SyslogDisplaySm.gif"><img src="images/Counter.gif"><img src="images/Unchecked.gif">
  1509. <img src="images/monitoritalert.gif"><img src="images/Computer.gif"><img src="images/L.gif">
  1510. <img src="images/Checked.gif"><img src="images/T.gif"><img src="images/Objects.gif">
  1511. <img src="images/sAdminServers.gif">
  1512. </div>
  1513.  
  1514.  <!-- PopUp to Prompt to Configure the Alert Filter -->
  1515.    <div id="PopUpDiv" class="PopUpBox" style="display:none; left:150; top:150; ">
  1516.    
  1517. <span id="ELogConfigLine" >
  1518. <center height="28" style="width:500; font-weight:800; font-size:10pt; background-color:graytext; color:captiontext" >Configure SYSLOGWatch Display Filter</center>
  1519.  <center><div class="EventConfig" id="ELogConfig" style="width:500px;" align="center">
  1520.  <table border="0" width="500" >
  1521.       <tr>
  1522.         <td width="90" align="right" class="inputlabel" height="32">Watch/Alert:</td>
  1523.             <td width="390" align="left" height="1">
  1524.             <select ONCHANGE="processAlertName()" SIZE="1" NAME="AL_AlertSel" id="AL_AlertSel" class="idis" style="width: 185pt" style="display: none"></select></td>
  1525.      </tr>
  1526.       <tr style="display:none">
  1527.         <td width="90" align="right" class="inputlabel" height="32">Start Date:</td>
  1528.           <td width="390" align="left" height="1"><input TYPE="text" SIZE="17" style="font-weight: 500" NAME="VA_StartDate" calendar="VA_calwin" CalObj="" onClick="this.blur(); processCalendarClick(this)" style="cursor:hand"> </td>
  1529.       </tr>
  1530.         <tr style="display:none">
  1531.         <td width="90" align="right" height="1"></td>
  1532.         <td width="390" align="left" height="1"><div class="CalendarTextBox" Name="VA_calwin" ID="VA_calwin" CalState="0" style="display: none"></div></td>
  1533.       </tr>
  1534.       
  1535.        <tr style="display:none">
  1536.        <td width="90" align="right" class="inputlabel" height="1">Stop Date:</td>
  1537.           <td width="390" align="left" height="1"><input TYPE="text" SIZE="17" style="font-weight: 500" NAME="VA_StopDate" onClick="this.blur(); processCalendarClick(this)" style="cursor:hand" CalObj="" calendar="VA_scalwin"></td>
  1538.       </tr>
  1539.         <tr style="display:none">
  1540.         <td width="90" align="right" height="1"></td>
  1541.         <td width="390" align="left" height="1"><div class="CalendarTextBox" Name="VA_scalwin" ID="VA_scalwin" CalState="0" style="display: none"></div></td>
  1542.       </tr>
  1543.    
  1544.       <tr>
  1545.         <td width="90" align="right" class="inputlabel" height="1">Selection(s):</td>
  1546.         <td width="390" align="left" height="1">
  1547.           <div id="VA_Select" class="VASelectBox"></div>
  1548.           </td>
  1549.       </tr>
  1550.     </table></div><table border="1" cellspacing="1" cellpadding="1" height="40" width="500">
  1551.    <tr><td align="left" width="20%" class="inputlabel">  Show On Open<br>  Last <select onchange="processMostRecentHours()" id="lasthours"></select> Hrs</td><td width="80%" align="center"><button onclick="processSelect('0')" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" style="width:80px; height:28px" id="bSelC" ><img src="images/selectall.gif" align="absmiddle" height="15" width="14">Select All</button>  <button onclick="processSelect('1')" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" style="width:93px; height:28px" id="bUselC" ><img src="images/unselectall.gif" align="absmiddle" height="15" width="14">Unselect All</button>  <button id="DoneButton" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Cancel and Hide the Configure Filter" style="width:70px; height:28px" onClick="processDoneButton()"><img src="images/CloseImg.gif" align="absmiddle" height="14" width="15"> Close</button></td></tr>
  1552.     </table></center></span>
  1553.     
  1554.        </div>
  1555.  <!-- End of PopUp to Prompt to Configure the Alert Filter -->
  1556.  
  1557.  
  1558.  
  1559. <center>
  1560.  
  1561.  <div id="VA_MainBox" class="VAMainBox" style="display:none">
  1562.  
  1563.   <div id="ViewAlertsTitleDiv"><table border="1"  borderColor="activeborder" align="left">
  1564.   <table border="1"  borderColor="activeborder" align="left">
  1565.     <tr><td borderColorDark="graytext" borderColorLight="white" style="font-weight:800; font-size:12pt; background-color:threedhighlight; color:windowtext"> <img src="images/SyslogDisplaySm.gif" align="absmiddle" height="16" width="16"> SYSLOGWatch Display </td></tr>
  1566. </table>
  1567. <BR CLEAR=ALL><HR align="left"></div>
  1568.  
  1569.  <!-- Alert Event Log Window -->
  1570. <center class="inputlabel">SYSLOGWatch Display</center>
  1571. <div class="EventLog" ID="ELogWin" style="width:99%" align="center">
  1572. <center><div style="display:none; width:100%" id="WarningBox" align="center"><table border="0" cellpadding="0" cellspacing="2">
  1573.   <tr>
  1574.     <td width="43"><img src="images/HourGlass.gif" width="32" height="32" alt="Please Wait!" align="bottom" border="0"></td>
  1575.     <td width="*" style="font-family:Arial; font-size:10pt; font-weight:bold; color:infotext">Please Wait For Most Recent SYSLOG Log Messages!</td>
  1576.   </tr>
  1577. </table>
  1578. </div>
  1579. <div style="display:none; width:100%" id="WarningBox1" align="center"><table border="0" cellpadding="0" cellspacing="2">
  1580.   <tr>
  1581.     <td width="*" style="font-family:Arial; font-size:10pt; font-weight:bold; color:red">There Are No Most Recent SYSLOG Log Messages Available!</td>
  1582.   </tr>
  1583. </table>
  1584. </div></center>
  1585. <span id="ELogText"></span><select SIZE="1" NAME="ELogParams" logeventid="" logtime="0" ELBgFlg=0 style="display: none"></select></div>
  1586.  <div style="height:0px; width:99%" align="center">
  1587.    <select SIZE="1" NAME="VA_EventStore" style="display: none"></select>
  1588.    <select SIZE="1" NAME="VA_ServEventStore" style="display: none"></select>
  1589.    <table border="1" cellspacing="1" cellpadding="1" height="40" width="100%">
  1590.     <tr>
  1591.       <td width="15%" align="left" class="inputlabel"><span title="Uses the 'Asterisk' WAV assignment in Control Panel->Sounds & Multimedia Properties"><INPUT TYPE="checkbox" NAME="AlertAudioEnabled" id="AlertAudioEnabled" class="inputlabel" CHECKED>Audio Alert</span></td>
  1592.         <td align="center" width ="70%"><button id="ViewCurrentButton" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="View Filter for Alerts and associated Events displayed in the Event Log" style="width:90px; height:29px" onClick="processViewCurrentButton()" disabled><img src="images/OpenImg.gif" align="absmiddle" height="14" width="15"> View Filter</button> <button id="ConfigButton" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Configure Filter for Alerts and associated Events displayed in the Event Log" style="width:120px; height:29px" onClick="processConfigureButton()" disabled><img src="images/ConfigImg.gif" align="absmiddle" height="18" width="17">Configure Filter</button> <button id="ClearButton" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Clear the Event Log" style="width:90px; height:29px" onClick="processClearButton()" disabled><img src="images/unselectall.gif" align="absmiddle" height="15" width="14"> Clear Log</button> <button id="StatusPrintButton" title="Print AlertWatch Status Log" onclick="if (this.bdis == '0') processPrintStatus();" bdis="0" style="width:90px; height:29px" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" DISABLED><img src="images/Printer.gif" align="absmiddle" height="15" width="17"> Print</button></td>
  1593.      <td width="15%" align="right"><button onclick="processBannerMenu()" title="Press to Toggle Hide/Show of Menu and Banner Frames" style="cursor:hand"><img src="images/FullView.gif" align="absmiddle" height="16" width="16"></button></td></tr></table></div>
  1594.  
  1595.  
  1596.  
  1597.    
  1598. <!-- Alert Filter Window-->
  1599. <span id="ELogViewCurLine" style="display:none"><HR align="left">
  1600. <center class="inputlabel" >SYSLOGWatch Display Filter</center>
  1601.  <div class="EventFilter" ID="ELogViewCur" style="height:110px; width:530px; " align="center">
  1602.     <select SIZE="1" NAME="VA_FilterStore" style="display: none"></select>
  1603.         </div>
  1604.   <table border="1" cellspacing="1" cellpadding="1" height="40" width="40%">
  1605.    <tr><td align="center"><button id="VC_DeleteButton" disabled="disabled" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Delete the Selected Filter Entry and stop display of associated Events in the Event Log" style="width:100px; height:28px" onClick="processDeleteEntryButton()"><img src="images/DelImg.gif" align="absmiddle" height="14" width="14">Delete Entry</button>  <button style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Hide the Filter Display" style="width:100px; height:28px" onClick="processHideCurrentButton()"><img src="images/collapse.gif" align="absmiddle" height="14" width="16">Collapse</button></td></tr>
  1606.     </table></span>
  1607.  
  1608.   <!--<div style="height:3px; width:92%" align="center"></div>-->
  1609.  
  1610.  </center></div>
  1611.  
  1612. </center>
  1613. </body>
  1614. </html>
  1615.